package
{

	import flash.display.MovieClip;

public dynamic class Bitter extends MovieClip
{
    var grav: Number = 1.2;
    var EF;
	/*
    var _name;
    var _parent;
    var _x;
    var _y;
	*/
    var caughtPlayer;
    var num;
    var xv;
    var yv;

    function Bitter()
    {
        super();
    }

    function init()
    {
        this.num = Number(this.name.substr(6, this.name.length - 6));
        this.xv = this.yv = 0;
        this.EF = this.fallEF;
        this.caughtPlayer = [];
    }

    function fallEF()
    {
        this.x = this.x + this.xv;
        this.y = this.y + this.yv;
        this.yv = this.yv + this.grav;
        if (this.parent.parent.ground.hitTest(this.x, this.y, true)) 
        {
            SoundManager.startSound("splash");
            this.EF = this.hitGround;
            var __reg2 = this.parent.parent.findPathPoint(this.x);
            this.y = this.parent.parent.pointsA[__reg2].y;
        }
        if (this.x < -10 || this.x > 610 || this.y > 460) 
        {
            this.parent.parent.removeObject(this);
        }
    }

    function hitGround()
    {
        var __reg2 = this.parent.parent.checkEnemyHitWide(this);
        if (__reg2.length > 0) 
        {
            var __reg4 = this.xv;
            for (var __reg3 in __reg2) 
            {
                __reg2[__reg3].makeDrunk();
            }
        }
    }

    function finishSplash()
    {
        this.parent.parent.removeObject(this);
    }

}

}